
 
package com.ruoyi.coin.enums;


/**
 *  链路类型
 */
public enum OklinkTranFlagEnum {

    SUCCESS("success", "成功"),
    FAIL("fail", "失败"),
    PENDING("pending", "等待确认")
    ;

    private final String code;
    private final String name;

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    OklinkTranFlagEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static OklinkTranFlagEnum getByCode(String code) {
        for (OklinkTranFlagEnum type : OklinkTranFlagEnum.values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        return null;
    }

}
